<template>
  <el-menu :default-active="onRoutes" class="el-menu-demo" mode="horizontal" router>
    <el-menu-item index="index">活动信息</el-menu-item>
    <el-menu-item index="management">活动管理</el-menu-item>
  </el-menu>
</template>

<script>
  export default {
    data() {
      return {
        activeIndex: 'index'
      };
    },
    methods: {
      handleSelect(key) {
        this.activeIndex = key;
      }
    },
    computed: {
      onRoutes() {
        return this.$route.path.replace('/','');
      }
    }
  }
</script>

<style>
  .el-menu-demo {
    width: 90%;
    float: right;
  }
</style>
